package com.example.settlement.mapper;

import com.example.settlement.entity.Settlement;
import com.example.settlement.entity.UserInfo;
import org.apache.catalina.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserInfoMapper {
    @Insert("INSERT INTO user_info (user_id, username, create_date) VALUES (#{userId}, #{username}, #{createDate})")
    void insert(UserInfo userInfo);

    @Select("SELECT * FROM user_info WHERE user_id = #{userId}")
    List<UserInfo> findByUserId(Long userId);
}
